cd ./dist
rm -rf ./readme.md
touch readme.md
echo "## 这是一个服务端项目的测试文件" >> readme.md
rm -rf pull.sh
touch pull.sh
echo "mv ./pull.sh ../pull.sh" >> pull.sh
echo "rm -rf ./nest-test" >> pull.sh
echo "pm2 stop main" >> pull.sh
echo "pm2 delete main" >> pull.sh
echo "git clone https://gitee.com/bingyu123/server-packaging-test-project.git ./nest-test" >> pull.sh
echo "cd ./nest-test" >> pull.sh
echo "npm i -f" >> pull.sh
# 启动项目
echo "pm2 start main.js" >> pull.sh

rm -rf ./package.json
touch package.json
echo "{" >> package.json
echo "  \"name\": \"test\"," >> package.json
echo "  \"version\": \"1.0.0\"," >> package.json
echo "  \"description\": \"这是一个测试项目\"," >> package.json
echo "  \"dependencies\": {" >> package.json
echo "    \"@nestjs/common\": \"^8.0.0\"," >> package.json
echo "    \"@nestjs/config\": \"^2.0.0\"," >> package.json
echo "    \"@nestjs/core\": \"^8.0.0\"," >> package.json
echo "    \"@nestjs/jwt\": \"^8.0.0\"," >> package.json
echo "    \"@nestjs/passport\": \"^8.2.1\"," >> package.json
echo "    \"@nestjs/platform-express\": \"^8.0.0\"," >> package.json
echo "    \"@nestjs/swagger\": \"^5.2.1\"," >> package.json
echo "    \"@nestjs/typeorm\": \"^8.0.3\"," >> package.json
echo "    \"@types/js-yaml\": \"^4.0.5\"," >> package.json
echo "    \"bcryptjs\": \"^2.4.3\"," >> package.json
echo "    \"class-transformer\": \"^0.5.1\"," >> package.json
echo "    \"class-validator\": \"^0.13.2\"," >> package.json
echo "    \"dayjs\": \"^1.11.0\"," >> package.json
echo "    \"js-yaml\": \"^4.1.0\"," >> package.json
echo "    \"ms\": \"^2.1.3\"," >> package.json
echo "    \"mysql2\": \"^2.3.3\"," >> package.json
echo "    \"passport-jwt\": \"^4.0.0\"," >> package.json
echo "    \"reflect-metadata\": \"^0.1.13\"," >> package.json
echo "    \"request-ip\": \"^2.1.3\"," >> package.json
echo "    \"rimraf\": \"^3.0.2\"," >> package.json
echo "    \"rxjs\": \"^7.2.0\"," >> package.json
echo "    \"stacktrace-js\": \"^2.0.2\"," >> package.json
echo "    \"swagger-ui-express\": \"^4.3.0\"," >> package.json
echo "    \"ts-enum-util\": \"^4.0.2\"," >> package.json
echo "    \"typeorm\": \"^0.2.34\"," >> package.json
echo "    \"express-rate-limit\": \"^6.3.0\"," >> package.json
echo "    \"log4js\": \"^6.4.4\"" >> package.json
echo "  }," >> package.json
echo " \"scripts\": {" >> package.json
echo "    \"pull\": \"./pull.sh\"" >> package.json
echo "  }" >> package.json
echo "}" >> package.json
git init
git add .
git commit -m "deploy"
git remote add origin https://gitee.com/bingyu123/server-packaging-test-project.git
git push origin master -f